// 大厅按钮
import DefineHomes from './GlobalFunction/DefinesHome'

cc.Class({
    extends: cc.Component,

    properties: {
        m_animation : cc.Animation,
    },

    onLoad () {

    },

    // 创建房间按钮
    onCreateRoomBtn : function(event) {
        DefineHomes.UICreatorHome.createRoom();
    },

    // 进入房间按钮
    onJoinRoomBtn : function(event) {
        DefineHomes.UICreatorHome.createJoinRoom();
    },

    // 头像按钮
    onIconButton : function(event) {
        var data = {};
        DefineHomes.UICreatorHome.createIcon(data);
    },

    // 福利按钮
    onWelfareButton : function(event) {
        DefineHomes.UICreatorHome.createWelfare();
    },

    // 战绩按钮
    onRecordButton : function(event) {
        DefineHomes.UICreatorHome.createRecord();
    },

    // 帮助按钮
    onHelpButton : function(event) {
        DefineHomes.UICreatorHome.createHelp();
    },

    // 活动按钮
    onActivityButton : function(event) {
        DefineHomes.UICreatorHome.createActivity();
    },

    // 分享按钮
    onShareButton : function(event) {
        DefineHomes.UICreatorHome.createShare();
    },

    // 设置按钮
    onSetUpButton : function(event) {
        DefineHomes.UICreatorHome.createSetUp();
    },

    // 加金币按钮
    onScoreButton : function(event) {
        DefineHomes.UICreatorHome.createScore();
    },


    aaaaaaaa : function() {
        // 获取动画组件
        var animation = this.m_animation.getComponent(cc.Animation);
        // 播放指定动画
        animation.play('Radar');
    },
});
